//
//  ParameterStorage
//
//
//  Created by  on 2019/2/18.
//  Copyright © 2019 . All rights reserved.
//  ota

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "SRBLeService.h"
//#import "SUOTAServiceManager.h"
#import "SROTADefines.h"

@interface ParameterStorage : NSObject

+ (ParameterStorage*) getInstance;
- (id) init;

@property(weak, nonatomic) CBPeripheral *device;
//@property(weak, nonatomic) SRBLeService *service;

@property NSURL *file_url;
@property TYPE_SUOTA_OR_SPOTA type;

@property MEM_TYPE mem_type;
@property MEM_BANK mem_bank;
@property UInt16 block_size;

@property UInt16 patch_base_address;
@property UInt16 i2c_device_address;
@property UInt32 spi_device_address; // Is actually 24 bits

@property GPIO gpio_scl;
@property GPIO gpio_sda;
@property GPIO gpio_miso;
@property GPIO gpio_mosi;
@property GPIO gpio_cs;
@property GPIO gpio_sck;

@property(assign, nonatomic, readonly) uint8_t memoryType;
@property(assign, nonatomic, readonly) uint8_t memoryBank;
@property(assign, nonatomic, readonly) uint16_t blockSize;
@property(assign, nonatomic, readonly) uint8_t spiMISOGPIO;
@property(assign, nonatomic, readonly) uint8_t spiMOSIGPIO;
@property(assign, nonatomic, readonly) uint8_t spiCSGPIO;
@property(assign, nonatomic, readonly) uint8_t spiSCKGPIO;

-(void)setSr09Param;
-(void)setSr23Param;


@end
